home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20030409-20031118
/
000404_anthonypieper@cs.com_Mon Nov 10 10:25:12 2003.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Path: newsmaster.cc.columbia.edu!panix!news.maxwell.syr.edu!postnews1.google.com!not-for-mail
From: anthonypieper@cs.com (newexpectuser)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Problem with Kermit spawned from Expect script sending files
Date: 10 Nov 2003 05:37:19 -0800
Organization: http://groups.google.com
Lines: 45
Message-ID: <f0bb0f39.0311100537.7a4d4faf@posting.google.com>
References: <f0bb0f39.0311061216.1ba040a0@posting.google.com> <slrnbqlcid.ooo.fdc@sesame.cc.columbia.edu> <f0bb0f39.0311070527.6ce76ffc@posting.google.com> <slrnbqnbfm.380.fdc@sesame.cc.columbia.edu> <f0bb0f39.0311070946.62574f98@posting.google.com> <slrnbqns98.69r.fdc@sesame.cc.columbia.edu> <slrnbqnsgg.856.fdc@sesame.cc.columbia.edu>
NNTP-Posting-Host: 209.251.39.194
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1068471440 979 127.0.0.1 (10 Nov 2003 13:37:20 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 10 Nov 2003 13:37:20 +0000 (UTC)
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14660
Frank da Cruz <fdc@columbia.edu> wrote in message news:<slrnbqnsgg.856.fdc@sesame.cc.columbia.edu>...
> In article <slrnbqns98.69r.fdc@sesame.cc.columbia.edu>, Frank da Cruz wrote:
> : In article <f0bb0f39.0311070946.62574f98@posting.google.com>,
> : newexpectuser wrote:
> :: I tried the /pty, but when I run it (via ./scriptname.sh), it puts me
> :: at a "C-Kermit>" prompt ?
> ::
> : Here's a script that works for me:
> :
> : #!/usr/bin/kermit +
> : ;
> : ; Using OpenSSH_3.7.1p2...
> : ;
> : set host /pty ssh -e none -l \v(userid) \%1
> : if fail stop 1
> : input 20 password:
> : if success lineout \%2
> :
> : In this script, \%1 is the hostname or address and \%2 is the password.
> :
> : I suspect your script did not wait for the "password:" prompt and the
> : ssh client does not allow typeahead.
> :
> I forgot to add, in case it is not obvious, that the script will return
> to the C-Kermit> when it has no more commands to execute, unless it
> executes an EXIT or QUIT command.
>
> The script fragment above, then, will return to the C-Kermit> prompt because
> it has no more commands to execute. Thus you must continue the script
> to do whatever you want it to do, for example:
>
> (wait for shell prompt)
> lineout "kermit -x" ; Start Kermit server
> rcd somedirectory ; CD to some directory on the host
I thought this command changed the directory on the remote system. I
have most of this working (including connecting now), however once I
get connected to the remote server, I want to change into a specific
directory on the remote server and I tried the rcd and do a ls -ltr
command, but it gives me my directory where I execute the script
(local machine) ?
> send /delete somefile ; "move" a file from here to there
> bye ; Shut down and log out the server
> exit ; Exit from local Kermit program
>
> - Frank